home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 11
/
Mac Magazin and MacEasy Magazine CD - Issue 11.iso
/
Sharewarebibliothek
/
Entwickler
/
appe Windows 2.0
/
filter.h
< prev
next >
Wrap
Text File
|
1995-06-11
|
2KB
|
55 lines
// File "filter.h" -
#ifndef ____FILTER_HEADER____
#define ____FILTER_HEADER____
// * ****************************************************************************** *
// Should the Inline jGNEFilter use MW's FRALLOC macros?
#define ____USE_FRALLOC____
// Constant offsets into jGNEFilter for inline data
#define kNextFilterOffset 0x02
#define kEventHelperOffset 0x06
#define kEventHelperDataOffset 0x0A
// Cleanest Solution for PPC - Stuff Raw 68k into a SystemPtr
#define kGNEFilterHexData "\p600C0000000000000000000000004E56000048E7E0E0207AFFEE2008\
4A80670E2F3AFFE82F09207AFFDE4E90508F4CDF07074E5E207AFFCC4ED08B4576656E7446696C7465720000"
// Declare a Guide for Passing the Filter Helper, for Universal Headers
#if !GENERATINGPOWERPC
typedef void (*FilterHelperProcPtr)(EventRecord *theEvent, Ptr helperData);
typedef FilterHelperProcPtr FilterHelperUPP;
enum {
uppFilterHelperProcInfo = 0
};
#define NewFilterHelperProc(proc) (FilterHelperUPP)(proc)
#else
typedef UniversalProcPtr FilterHelperUPP;
enum {
uppFilterHelperProcInfo = kCStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(EventRecord *)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
};
#define NewFilterHelperProc(proc) (FilterHelperUPP) \
NewRoutineDescriptor((ProcPtr)(proc), uppFilterHelperProcInfo, GetCurrentISA())
#endif GENERATINGPOWERPC
// * ****************************************************************************** *
// * ****************************************************************************** *
// Function Prototypes
Ptr InstallEventFilter(FilterHelperUPP helperProc, Ptr helperData);
Ptr ReleaseEventFilter(Ptr filterProc);
#if GENERATING68K
asm void EventFilter(void);
void EndEventFilter(void);
#endif GENERATING68K
void EventFilterHelper(EventRecord *theEvent, Ptr helperData);
#endif ____FILTER_HEADER____